<?php /* Smarty version Smarty-3.1.12, created on 2013-03-16 16:44:56
         compiled from "/www/htdocs/w00fc40b/dota2league/templates/profile/last5Matches.tpl" */ ?>
<?php /*%%SmartyHeaderCode:8319181925113bcc777f9a8-85333835%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4168cdd160c24388c060b227096d37a5f3e6ee1c' => 
    array (
      0 => '/www/htdocs/w00fc40b/dota2league/templates/profile/last5Matches.tpl',
      1 => 1363448694,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '8319181925113bcc777f9a8-85333835',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_5113bcc77813b4_93163806',
  'variables' => 
  array (
    'last5Matches' => 0,
    'v' => 0,
    'statusClass' => 0,
    'result' => 0,
    'team' => 0,
    'steamID' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5113bcc77813b4_93163806')) {function content_5113bcc77813b4_93163806($_smarty_tpl) {?><h3>Last 5 Matches</h3>
<?php if (count($_smarty_tpl->tpl_vars['last5Matches']->value)>0&&is_array($_smarty_tpl->tpl_vars['last5Matches']->value)){?>
	<table class="table table-striped">
		<thead>
			<tr align="center">
				<th></th>
				<th>Result</th>
				<th>MatchID</th>
				<th>Mode</th>
				<th>Team</th>
			</tr>
		</thead>
		
		<tbody>
	<!-- TBODY zusammenbauen -->
		  <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['last5Matches']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
		  	<?php if ($_smarty_tpl->tpl_vars['v']->value['MatchTypeID']==1){?>
			  		<?php $_smarty_tpl->tpl_vars["team"] = new Smarty_variable('Random', null, 0);?>
			<?php }elseif($_smarty_tpl->tpl_vars['v']->value['MatchTypeID']==2){?>
			<?php }elseif($_smarty_tpl->tpl_vars['v']->value['MatchTypeID']==3){?>
			<?php }elseif($_smarty_tpl->tpl_vars['v']->value['MatchTypeID']==4){?>
			<?php }elseif($_smarty_tpl->tpl_vars['v']->value['MatchTypeID']==5){?>
			<?php }elseif($_smarty_tpl->tpl_vars['v']->value['MatchTypeID']==6){?>
		  	<?php }?>
		  	
		  	<?php if ($_smarty_tpl->tpl_vars['v']->value['TeamWonID']==$_smarty_tpl->tpl_vars['v']->value['TeamID']){?>
		  		<?php $_smarty_tpl->tpl_vars["statusClass"] = new Smarty_variable('success', null, 0);?>
		  		<?php $_smarty_tpl->tpl_vars["result"] = new Smarty_variable('won', null, 0);?>
		  	<?php }else{ ?>
		  		<?php if ($_smarty_tpl->tpl_vars['v']->value['Canceled']==1){?>
		  			<?php $_smarty_tpl->tpl_vars["statusClass"] = new Smarty_variable('important', null, 0);?>
		  			<?php $_smarty_tpl->tpl_vars["result"] = new Smarty_variable('<i class="icon-remove t" title="Match canceled"></i>', null, 0);?>
		  		<?php }else{ ?>
		  			<?php $_smarty_tpl->tpl_vars["statusClass"] = new Smarty_variable('important', null, 0);?>
		  			<?php $_smarty_tpl->tpl_vars["result"] = new Smarty_variable('lost', null, 0);?>
		  		<?php }?>
		  		
		  	<?php }?>
		  	
		  	<?php if ($_smarty_tpl->tpl_vars['v']->value['EloChange']==''&&$_smarty_tpl->tpl_vars['v']->value['TeamWonID']==$_smarty_tpl->tpl_vars['v']->value['TeamID']){?>
		  		<?php $_smarty_tpl->tpl_vars["v.EloChange"] = new Smarty_variable('+0', null, 0);?>
		  	<?php }elseif($_smarty_tpl->tpl_vars['v']->value['EloChange']==''&&$_smarty_tpl->tpl_vars['v']->value['TeamWonID']!=$_smarty_tpl->tpl_vars['v']->value['TeamID']){?>
		  		<?php $_smarty_tpl->tpl_vars["v.EloChange"] = new Smarty_variable('-0', null, 0);?>
		  	<?php }?>

		  	<tr>
				<td><?php echo $_smarty_tpl->getSubTemplate ("prototypes/matchTypeIcon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('MatchTypeID'=>((string)$_smarty_tpl->tpl_vars['v']->value['MatchTypeID'])), 0);?>
</td>
				<td><span class="label label-<?php echo $_smarty_tpl->tpl_vars['statusClass']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['result']->value;?>
 <?php echo $_smarty_tpl->tpl_vars['v']->value['EloChange'];?>
</span><?php echo $_smarty_tpl->getSubTemplate ("prototypes/leaverIcon.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('width'=>"16",'leaver'=>$_smarty_tpl->tpl_vars['v']->value['Leaver']), 0);?>
</td>
				<td><a href="match.php?matchID=<?php echo $_smarty_tpl->tpl_vars['v']->value['MatchID'];?>
"><?php echo $_smarty_tpl->tpl_vars['v']->value['MatchID'];?>
</a></td>
				<td><span class="t" title="<?php echo $_smarty_tpl->tpl_vars['v']->value['MatchMode'];?>
"><?php echo $_smarty_tpl->tpl_vars['v']->value['MatchModeShortcut'];?>
</span></td>
				<td><?php echo $_smarty_tpl->tpl_vars['team']->value;?>
</td>
			</tr>
		  <?php } ?>
		</tbody>
	</table>
	<p>
	<a href="lastMatches.php?ID=<?php echo $_smarty_tpl->tpl_vars['steamID']->value;?>
">View All Matches <i class="icon-double-angle-right"></i></a>
	</p>
<?php }else{ ?>
	<div class="alert fade in">No Matches found!</div>
	
<?php }?><?php }} ?>